/**
 * 获取奖品有效时间
 * @param activityInfo 
 * @param awardInfo 
 * @returns 
 */
export const getAwardValidTime = (activityInfo: IActivityInfo, awardInfo: IAwards) => {
  const { endTime } = activityInfo // 活动结束时间
  const { expiredTime, failureTime } = awardInfo // 奖品过期时间(领取7天后)、奖品失效时间,取消奖品失效时间

  const validTime = Math.min(endTime || Infinity, expiredTime)

  return validTime
}
